home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 025a / crdepp.zip / DATE.H < prev    next >
C/C++ Source or Header  |  1991-01-13  |  1KB  |  61 lines

  1. /* date.h */
  2.  
  3. /*
  4. The C Relational Database Engine.
  5. Copyright (c) 1990, Mark Lang.
  6. All Rights Reserved.
  7. */
  8.  
  9. #ifndef __LARGE__
  10. #error You must compile in LARGE memory model to use CRDE!
  11. #endif
  12.  
  13. #ifndef __DATE_T__
  14. #define __DATE_T__
  15.  
  16. #if __STDC__
  17. #define ddecl(type) type
  18. #else
  19. #define ddecl(type) type cdecl
  20. #endif
  21.  
  22. /* date_t defined */
  23.  
  24. typedef long date_t;
  25.  
  26. /* constants for days of week */
  27.  
  28. #define SUNDAY    0
  29. #define MONDAY    1
  30. #define TUESDAY   2
  31. #define WEDNESDAY 3
  32. #define THURSDAY  4
  33. #define FRIDAY    5
  34. #define SATURDAY  6
  35.  
  36. /* function protypes */
  37.  
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41. ddecl(int)    day        (date_t dt);
  42. ddecl(int)    dayofweek  (date_t dt);
  43. ddecl(int)    dayofyear  (int month, int day, int year);
  44. ddecl(int)    daysinmonth(int month, int year);
  45. ddecl(int)    daysinyear (int year);
  46. ddecl(date_t) firstday   (int month, int year, int dayofweek);
  47. ddecl(int)    gmdate     (date_t dt, int *month, int *day, int *year);
  48. ddecl(int)    leapyear   (int year);
  49. ddecl(date_t) mkdate     (int month, int day, int year);
  50. ddecl(int)    month      (date_t dt);
  51. ddecl(date_t) monthadd   (date_t dt, int months);
  52. ddecl(int)    monthday   (int days, int year, int *month, int *day);
  53. ddecl(int)    year       (date_t dt);
  54. ddecl(date_t) yearadd    (date_t dt, int years);
  55. #ifdef __cplusplus
  56. }
  57. #endif
  58.  
  59. #endif
  60.  
  61. /* end of date.h */